import Layout from '@/page/index/index.vue';

export default [
  {
    path: '/iot/category',
    name: '品类信息',
    component: Layout,
    children: [{
      path: '/iot/category',
      name: '品类管理',
      component: () => import(/* webpackChunkName: "views" */ '@/views/iot/category/category.vue')
    }, {
      path: '/iot/category/detail/:categoryId',
      name: '品类详情',
      component: () => import(/* webpackChunkName: "views" */ '@/views/iot/category/categoryDetail.vue')
    }, {
      path: '/iot/category/draft/:categoryId',
      name: '品类草稿',
      component: () => import(/* webpackChunkName: "views" */ '@/views/iot/category/categoryDraft.vue')
    }]
  },
  {
    path: '/iot/product',
    name: '产品信息',
    component: Layout,
    children: [{
      path: '/iot/product',
      name: '产品管理',
      component: () => import(/* webpackChunkName: "views" */ '@/views/iot/product/product.vue')
    }, {
      path: '/iot/product/detail/:productKey/:productId',
      name: '产品详情',
      meta: {
        keepAlive: true
      },
      component: () => import(/* webpackChunkName: "views" */ '@/views/iot/product/productDetail.vue')
    }, {
      path: '/iot/product/draft/:productKey/:productId',
      name: '产品草稿',
      component: () => import(/* webpackChunkName: "views" */ '@/views/iot/product/productDraft.vue')
    }]
  },
  {
    path: '/iot/device',
    name: '设备信息',
    component: Layout,
    children: [{
      path: '/iot/device',
      name: '设备管理',
      component: () => import(/* webpackChunkName: "views" */ '@/views/iot/device/device.vue')
    }, {
      path: '/iot/device/detail/:productKey/:deviceName',
      name: '设备详情',
      component: () => import(/* webpackChunkName: "views" */ '@/views/iot/device/deviceDetail.vue')
    }]
  },
  {
    path: '/iot/group',
    name: '分组信息',
    component: Layout,
    children: [{
      path: '/iot/group',
      name: '分组管理',
      component: () => import(/* webpackChunkName: "views" */ '@/views/iot/group/group.vue')
    }, {
      path: '/iot/group/detail/:groupId',
      name: '分组详情',
      component: () => import(/* webpackChunkName: "views" */ '@/views/iot/group/groupDetail.vue')
    }]
  }
];
